﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using LanguageSchool.Model;

namespace LanguageSchool
{
    /// <summary>
    /// Логика взаимодействия для AddTeacherWindow.xaml
    /// </summary>
    public partial class AddTeacherWindow : Window
    {
        private TeacherMeta TeacherModel { get; set; }

        public AddTeacherWindow(Teacher teacher)
        {
            TeacherModel = new TeacherMeta(teacher);
            InitializeComponent();
            DataContext = TeacherModel;
        }
        
        private void BackButton_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }

        private void Mon_Click(object sender, RoutedEventArgs e)
        {
            if (Mon.IsChecked.Value)
            {
                MonFrom1.Text = "7:00";
                MonTill1.Text = "20:00";
                MonFrom2.IsEnabled = false;
                MonTill2.IsEnabled = false;
            }
            else 
            {
                MonFrom2.IsEnabled = true;
                MonTill2.IsEnabled = true;
            }
        }

        private void SaveButton_Click(object sender, RoutedEventArgs e)
        {
            DialogResult = true;
        }
    }
}
